<html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>Table</title>
		<link rel="stylesheet" href="__STATIC__/plugins/layui/css/layui.css" media="all" />
		<link rel="stylesheet" href="__CSS__/global.css" media="all">
		<link rel="stylesheet" href="__STATIC__/plugins/font-awesome/css/font-awesome.min.css">
		<link rel="stylesheet" href="__CSS__/table.css" />
	    <script type="text/javascript" charset="utf-8" src="__JS__/ueditor.config.js"></script>
	    <script type="text/javascript" charset="utf-8" src="__JS__/ueditor.all.min.js"> </script>
        <script type="text/javascript" charset="utf-8" src="__JS__/lang/zh-cn/zh-cn.js"></script>



	</head>
	<body>
		<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
				<legend>
				
		  		
				编辑模板
		  		
		  			
		</fieldset>
		<form action="__ADMIN__/commission/bank_upd" method="post">

   			<div class="layui-form-item">
					<label class="layui-form-label">模板名称:</label>
					<div class="layui-input-block">
						<input name="model_name"  lay-verify="title" autocomplete="off" value="{$info.model_name}" placeholder="设置模板名称" class="layui-input" type="text">
					</div>
				</div>			
			 <div class="layui-form-item">
				    <label class="layui-form-label">单选框</label>
				    <div class="layui-input-block">
				      <input type="radio" name="data[type]" value="1" class="type" {if condition="($info.bank.type==1)" } checked id="checked" {/if}>一级&nbsp;
				      <input type="radio" name="data[type]" value="2"class="type"{if condition="($info.bank.type==2)" } checked  id="checked" {/if} >二级&nbsp;
				      <input type="radio" name="data[type]" value="3"class="type" {if condition="($info.bank.type==3)" } checked  id="checked" {/if} {if condition="(empty($info.bank))" } checked id="checked" {/if}    >三级
				    </div>
				  </div>
				      
				   
         {volist name="bank" id="vo" }	

				<div class="layui-form-item">
					<label class="layui-form-label">{$vo.bank_name}:</label>
					<div class="layui-input-inline">
       					 <input name="data[bank][{$vo.bank_name}][one]" value="{$vo.one}" lay-verify="required|phone" autocomplete="off" class="layui-input one" type="text" placeholder="第一级">
					</div>
					<div class="layui-input-inline">
       					 <input name="data[bank][{$vo.bank_name}][two]" value="{$vo.two}" lay-verify="required|phone" autocomplete="off" class="layui-input two " type="text" placeholder="第二级">
					</div>
					<div class="layui-input-inline">
       					 <input name="data[bank][{$vo.bank_name}][three]" value="{$vo.three}" lay-verify="required|phone" autocomplete="off" class="layui-input three" type="text" placeholder="第三级">
					</div>
				</div>
  	  		{/volist}

				  <div class="layui-form-item">
				
				    </div>
				  </div> 
				
				<input type="hidden" name="id" value="{$info.id}">
				<div class="layui-input-block">
					<input type="submit" class="layui-btn" value="提交">
				</div>
		</form>
		<script type="text/javascript" src="__STATIC__/plugins/layui/layui.js"></script>
			<script type="text/javascript" src="__STATIC__/datas/nav.js"></script>	
			<script src="__JS__/index.js"></script>
		    <script src="__JS__/jquery.js"></script>
	</body>
</html>
<script >

		layui.use(['form', 'layedit', 'laydate'], function() {
	  var form = layui.form
		  ,layer = layui.layer
		  ,layedit = layui.layedit
		  ,laydate = layui.laydate;


		var editIndex = layedit.build('LAY_demo_editor');

		})

</script>
  <script type="text/javascript">
  	$(function(){
  		  	 $("#checked").trigger("click");
  	})
      $(".type").click(function(){
      	var type = $(this).val();
      	if(type == 1){
      		$(".three").hide();
      		$(".two").hide();
      	}
      	if (type == 2){
      		$(".three").hide();
      		$(".two").show();

      	} if(type == 3) {
      		$(".two").show();
      		$(".three").show();
      		
      	}

      })
        $("#checked").click(function(){
      	var type = $(this).val();
      	if(type == 1){
      		$(".three").hide();
      		$(".two").hide();
      	}
      	if (type == 2){
      		$(".three").hide();
      		$(".two").show();

      	} if(type == 3) {
      		$(".two").show();
      		$(".three").show();
      		
      	}

      })
</script>